package server;

public class RequestObject implements java.io.Serializable {
	private static final long serialVersionUID = -6841646037222523093L;
	private int command;
	private String s1, s2;
	
	
	/**
	 * Creates an object that makes it easier to send commands and Strings between the client and
	 * the server. 
	 * @param command
	 * @param s1
	 * @param s2
	 */
	public RequestObject(int command, String s1, String s2) {
		this.command = command;
		this.s1 = s1;
		this.s2 = s2;
	}
	
	/**
	 * A method that retrieves the command in a RequestObject.
	 * @return the command in a RequestObject
	 */
	public int getCommand() {
		return command;
	}

	/**
	 * A method that is used to retrieve the first String in a RequestObject
	 * @return the first String in a RequestObject
	 */
	public String text1() {
		return s1;
	}
	
	/**
	 * A method that is used to retrieve the second string in a RequestObject
	 * @return the second String in a RequestObject
	 */
	public String text2() {
		return s2;
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return command + " " + s1 + " " + s2;
	}
}
